<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
   String comName = (String)request.getAttribute("comName");
%>
<html>

<%@ include file="../bui_header.jsp" %>

<body>

<div class="container">
    <div class="search-grid-container">
      <div id="mtpj_grid"></div>
    </div>
    
    <!-- <div class="search-grid-container">
      <div id="grid1"></div>
    </div> -->
  </div>
    
<script type="text/javascript">
BUI.use(['bui/grid','bui/data'], function (Grid, Data) {
	var comName = '<%=comName %>';
	var columns = [
       /*  {title:'编号',dataIndex:'number',width:'15%'
        }, */
        {title:'企业名称', dataIndex:'companyName', width:'15%'},
        {title:'所属年度', dataIndex:'belongYear',width:'15%'},
        {title:'新闻媒体',dataIndex:'newsMedia',width:'15%'},
        {title:'报道内容概要',dataIndex:'reportContent',width:'15%'}, 
        {title:'报道时间',dataIndex:'reportDate',width:'15%'}, 
        {title:'新闻评分',dataIndex:'newsGrade',width:'10%'}
      ];
      
      var store = new Data.Store({
    	  url : '<%=contextPath %>/report/common/mtpj/getData.do?comName='+comName,
          proxy : {//设置请求相关的参数
            method : 'post',
            dataType : 'json'
            //dataType : 'jsonp', //返回数据的类型
            //limitParam : 'limit', //一页多少条记录
          	//pageIndexParam : 'pageIndex', //页码
            //startParam : 'startNum' //起始记录
          },
          autoLoad:true,
          pageSize:30	// 配置分页数目
      });
      
      var height = $(window).height() - 60;  
      var grid = new Grid.Grid({
    	  height: height,
          render: '#mtpj_grid',
          columns : columns,
          loadMask: true,
          store: store,
          // 底部工具栏
          bbar:{
              // pagingBar:表明包含分页栏
              pagingBar:true
          }
      });

      grid.render();
      
ss();
      
      function ss() {
      	var $grid = $(".bui-grid");
      	if (!$grid)
    		  return ;
      	var $gridBody = $grid.find(".bui-grid-body");
      	if (!$gridBody)
    		  return ;
      	$gridBody.css('overflow-y', 'auto');
  	  
  	  var $gridTable = $grid.find(".bui-grid-table");
  	  if ($gridTable)
  		  $gridTable.width($gridBody.width()); 
      }
    
});

</script>

		
</body>
</html>